package order

import (
	//"encoding/json"

	beego "github.com/beego/beego/v2/server/web"
)

type OrderController struct {
	beego.Controller
}

type Student struct {
	Id   string `json:"id" form:"id"`
	Name string `json:"name" form:"name"`
	Age  int    `json:"age" form:"age"`
}

func (c *OrderController) Get() {
	var r Student = Student{}
	r.Age = 1
	r.Id = "2"
	r.Name = "acd"
	c.Data["json"] = r //key必须是json
	c.ServeJSON()
}
